<?php 
/* SVN FILE: $Id$ */
/* BonusType Test cases generated on: 2009-05-30 14:05:57 : 1243707837*/
App::import('Model', 'BonusType');

class BonusTypeTestCase extends CakeTestCase {
	var $BonusType = null;
	var $fixtures = array('app.bonus_type', 'app.good', 'app.user_bonus');

	function startTest() {
		$this->BonusType =& ClassRegistry::init('BonusType');
	}

	function testBonusTypeInstance() {
		$this->assertTrue(is_a($this->BonusType, 'BonusType'));
	}

	function testBonusTypeFind() {
		$this->BonusType->recursive = -1;
		$results = $this->BonusType->find('first');
		$this->assertTrue(!empty($results));

		$expected = array('BonusType' => array(
			'id'  => 1,
			'type_name'  => 'Lorem ipsum dolor sit amet',
			'type_money'  => 'Lorem ipsum dolor sit amet',
			'send_type'  => 1,
			'min_amount'  => 1,
			'max_amount'  => 1,
			'send_start_date'  => '2009-05-30 14:23:57',
			'send_end_date'  => '2009-05-30 14:23:57',
			'use_start_date'  => '2009-05-30 14:23:57',
			'use_end_date'  => '2009-05-30 14:23:57',
			'min_goods_amount'  => '2009-05-30 14:23:57'
		));
		$this->assertEqual($results, $expected);
	}
}
?>